<div id="Connecting-via-rsh"></div>
<div class="header">
<p>
Next: [[cvs: Direct connection with password authentication#Direct connection with password authentication|Password authenticated]], Previous: [[cvs: Server requirements#Server requirements|Server requirements]], Up: [[cvs: Remote repositories#Remote repositories|Remote repositories]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Connecting-with-rsh"></div>
==== Connecting with rsh ====

<div id="index-rsh"></div>
<small>CVS</small> uses the &lsquo;<code>rsh</code>&rsquo; protocol to perform these
operations, so the remote user host needs to have a
&lsquo;<tt>.rhosts</tt>&rsquo; file which grants access to the local
user. Note that the program that <small>CVS</small> uses for this
purpose may be specified using the &lsquo;<tt>--with-rsh</tt>&rsquo;
flag to configure.

For example, suppose you are the user &lsquo;<code>mozart</code>&rsquo; on
the local machine &lsquo;<code>toe.example.com</code>&rsquo;, and the
server machine is &lsquo;<code>faun.example.org</code>&rsquo;.  On
faun, put the following line into the file
&lsquo;<tt>.rhosts</tt>&rsquo; in &lsquo;<code>bach</code>&rsquo;&rsquo;s home directory:

<div class="example" style="margin-left: 3.2em">
 toe.example.com  mozart
</div>

Then test that &lsquo;<code>rsh</code>&rsquo; is working with

<div class="example" style="margin-left: 3.2em">
 rsh -l bach faun.example.org 'echo $PATH'
</div>

<div id="index-CVS_005fSERVER_002c-environment-variable"></div>
Next you have to make sure that <code>rsh</code> will be able
to find the server.  Make sure that the path which
<code>rsh</code> printed in the above example includes the
directory containing a program named <code>cvs</code> which
is the server.  You need to set the path in
&lsquo;<tt>.bashrc</tt>&rsquo;, &lsquo;<tt>.cshrc</tt>&rsquo;, etc., not &lsquo;<tt>.login</tt>&rsquo;
or &lsquo;<tt>.profile</tt>&rsquo;.  Alternately, you can set the
environment variable <code>CVS_SERVER</code> on the client
machine to the filename of the server you want to use,
for example &lsquo;<tt>/usr/local/bin/cvs-1.6</tt>&rsquo;.

There is no need to edit &lsquo;<tt>inetd.conf</tt>&rsquo; or start a
<small>CVS</small> server daemon.

<div id="index-_003aserver_003a_002c-setting-up"></div>
<div id="index-_003aext_003a_002c-setting-up"></div>
<div id="index-Kerberos_002c-using-kerberized-rsh"></div>
<div id="index-SSH-_0028rsh-replacement_0029"></div>
<div id="index-rsh-replacements-_0028Kerberized_002c-SSH_002c-_0026c_0029"></div>
There are two access methods that you use in <code>CVSROOT</code>
for rsh.  <code>:server:</code> specifies an internal rsh
client, which is supported only by some <small>CVS</small> ports.
<code>:ext:</code> specifies an external rsh program.  By
default this is <code>rsh</code> (unless otherwise specified
by the &lsquo;<tt>--with-rsh</tt>&rsquo; flag to configure) but you may set the
<code>CVS_RSH</code> environment variable to invoke another
program which can access the remote server (for
example, <code>remsh</code> on HP-UX 9 because <code>rsh</code> is
something different).  It must be a program which can
transmit data to and from the server without modifying
it; for example the Windows NT <code>rsh</code> is not
suitable since it by default translates between CRLF
and LF.  The OS/2 <small>CVS</small> port has a hack to pass &lsquo;<code>-b</code>&rsquo;
to <code>rsh</code> to get around this, but since this could
potentially cause problems for programs other than the
standard <code>rsh</code>, it may change in the future.  If
you set <code>CVS_RSH</code> to <code>SSH</code> or some other rsh
replacement, the instructions in the rest of this
section concerning &lsquo;<tt>.rhosts</tt>&rsquo; and so on are likely
to be inapplicable; consult the documentation for your rsh
replacement.

Continuing our example, supposing you want to access
the module &lsquo;<tt>foo</tt>&rsquo; in the repository
&lsquo;<tt>/usr/local/cvsroot/</tt>&rsquo;, on machine
&lsquo;<tt>faun.example.org</tt>&rsquo;, you are ready to go:

<div class="example" style="margin-left: 3.2em">
 cvs -d :ext:bach@faun.example.org:/usr/local/cvsroot checkout foo
</div>

(The &lsquo;<tt>bach@</tt>&rsquo; can be omitted if the username is
the same on both the local and remote hosts.)



----

<div class="header">
<p>
Next: [[cvs: Direct connection with password authentication#Direct connection with password authentication|Password authenticated]], Previous: [[cvs: Server requirements#Server requirements|Server requirements]], Up: [[cvs: Remote repositories#Remote repositories|Remote repositories]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
